﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListDelivery.aspx.cs" Inherits="Sbook.AdminIstrator.adminsys" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="~/AdminIstrator/ControlAdmin/MenuLeft.ascx" TagName="MenuLeft"
    TagPrefix="UC" %>
<%@ Register Src="ControlAdmin/ucLogout.ascx" TagName="ucLogout" TagPrefix="uc1" %>
<%@ Register Src="ControlAdmin/MenuTop.ascx" TagName="MenuTop" TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Admin System</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/ddaccordion.js"></script>
    <script type="text/javascript">
        ddaccordion.init({
            headerclass: "submenuheader", //Shared CSS class name of headers group
            contentclass: "submenu", //Shared CSS class name of contents group
            revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
            mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
            collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
            defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
            onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
            animatedefault: false, //Should contents open by default be animated into view?
            persiststate: true, //persist state of opened contents within browser session?
            toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
            togglehtml: ["suffix", "<img src='images/plus.gif' class='statusicon' />", "<img src='images/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
            animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
            oninit: function (headers, expandedindices) { //custom code to run when headers have initalized
                //do nothing
            },
            onopenclose: function (header, index, state, isuseractivated) { //custom code to run whenever a header is opened or closed
                //do nothing
            }
        })
    </script>
    <script src="js/jquery.jclock-1.2.0.js.txt" type="text/javascript"></script>
    <script type="text/javascript" src="js/jconfirmaction.jquery.js"></script>
    <script type="text/javascript">

        $(document).ready(function () {
            $('.ask').jConfirmAction();
        });
	
    </script>
    <script type="text/javascript">
        $(function ($) {
            $('.jclock').jclock();
        });
    </script>
    <script language="javascript" type="text/javascript" src="js/niceforms.js"></script>
    <link rel="stylesheet" type="text/css" media="all" href="css/niceforms-default.css" />
    <link rel="stylesheet" type="text/css" href="css/tcal.css" />
    <script type="text/javascript" src="js/tcal.js"></script>
</head>
<body>
    <form runat="server">
    <div id="main_container">
        <div class="header">
            <div class="logo">
                <a href="Default.aspx">
                    <img alt="" src="../images/logo_sach.gif" width="130" height="100" />
                </a>
            </div>
            <div class="right_header">
                Welcome Admin | <uc1:ucLogout ID="ucLogout1" runat="server" />
            </div>
            <div class="jclock">
            </div>
        </div>
        <div class="main_content">
           <uc1:MenuTop runat="server" ID="menuTop" />
            <div class="center_content">
                <UC:MenuLeft runat="server" ID="MenuRight"></UC:MenuLeft>
                <div class="right_content">
                    <h2>
                        LIST DELIVERY NOTE</h2>
                    <div style="float: right; margin-right: 10px; margin-bottom: 10px;">
                        From Date :
                        <%--<input type="text" name="date" class="tcal" value="Choose Date" />--%>
                        <asp:TextBox ID="txtBeginDate" runat="server" CssClass="tcal" Text="" ReadOnly="true"></asp:TextBox>
                        To Date :
                        <%--<input type="text" name="date2" class="tcal" value="Choose Date" />--%>
                        <asp:TextBox ID="txtEndDate" runat="server" CssClass="tcal" Text="" ReadOnly="true"></asp:TextBox>
                        <%--<input type="button" name="btSearch" value="Search" style="width:70px; height:30px; cursor:pointer;" />--%>
                        <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
                    </div>
                    <br />
                    <br />
                    <asp:Repeater ID="rpDelivery" runat="server" 
                        onitemcommand="rpDelivery_ItemCommand">
                        <HeaderTemplate>
                            <table id="rounded-corner" summary="2007 Major IT Companies' Profit">
                                <thead>
                                    <tr>
                                        <th scope="col" class="rounded-company">
                                        </th>
                                        <th scope="col" class="rounded">
                                            OrderID
                                        </th>
                                        <th scope="col" class="rounded">
                                            Date
                                        </th>
                                        <th scope="col" class="rounded">
                                            Price
                                        </th>
                                        <th scope="col" class="rounded">
                                            Status
                                        </th>
                                        <th scope="col" class="rounded">
                                            Edit
                                        </th>
                                        <th scope="col" class="rounded-q4">
                                            Delete
                                        </th>
                                    </tr>
                                </thead>
                                <tfoot>
                                    <tr>
                                        <td colspan="6" class="rounded-foot-left">
                                            <em></em>
                                        </td>
                                        <td class="rounded-foot-right">
                                            &nbsp;
                                        </td>
                                    </tr>
                                </tfoot>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tbody>
                                <tr>
                                    <td>
                                        <asp:CheckBox runat="server" ID="chkSelect" />
                                    </td>
                                    <td>
                                        <a href='/AdminIstrator/Delivery_Detail.aspx?DeliveryId=<%#Eval("DeliveryId") %>'>
                                            <%#Eval("DeliveryCode") %>
                                        </a>
                                    </td>
                                    <td>
                                        <%#Eval("DeliveryDate") %>
                                    </td>
                                    <td>
                                        <asp:Label ID="lblPrice" runat="server" Text='<%#Eval("DeliveryPrice") %>'></asp:Label>  VND
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlStatus" runat="server">
                                            <asp:ListItem Value="0">Chưa xử lý</asp:ListItem>
                                            <asp:ListItem Value="1">Đã xác nhận</asp:ListItem>
                                            <asp:ListItem Value="2">Chờ giao hàng</asp:ListItem>
                                            <asp:ListItem Value="3">Đã hoàn tất</asp:ListItem>
                                            <asp:ListItem Value="4">Hủy đơn hàng</asp:ListItem>
                                          
                                        </asp:DropDownList>
                                        <asp:Button ID="btnStatus" runat="server" CommandName="Approve" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"DeliveryId")%>' Text="Cập nhật" />
                                        <asp:Label ID="lblStatus" runat="server" Text='<%#Eval("DeliveryStatus") %>' Visible="false"> </asp:Label>
                                        <asp:Label ID="lblDeliveryId" runat="server" Text='<%#Eval("DeliveryId") %>' Visible="false"></asp:Label>
                                    </td>
                                    <td>
                                        <a href="#">
                                            <img src="images/user_edit.png" alt="" title="" />
                                        </a>
                                    </td>
                                    <td>
                                        <a href='DeleteAction.aspx?DeliveryId=<%# Eval("DeliveryID") %>' class="ask">
                                            <img src="images/trash.png" alt="" title="" border="0" /></a>
                                    </td>
                                </tr>
                            </tbody>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    <asp:LinkButton ID="lbtDelete" runat="server" CssClass="bt_red" OnClientClick="javascript:return confirm('Chắc chắn xóa?');"
                        OnClick="lbtDelete_Click"><span class="bt_red_lft"></span><strong>Delete Items </strong><span class="bt_red_r"></span></asp:LinkButton>
                    <asp:LinkButton ID="lbtViewAll" runat="server" CssClass="bt_blue" OnClick="lbtViewAll_Click"><span class="bt_blue_lft"></span><strong>View all items</strong><span class="bt_blue_r"></span></asp:LinkButton>
                    <a href="#" class="bt_green"><span class="bt_green_lft"></span><strong>Add new item</strong><span
                        class="bt_green_r"></span></a>
                    <div class="pagination">
                        <%--<p><span class="disabled"><< prev</span><span class="current">1</span><a href="">2</a><a href="">3</a><a href="">4</a><a href="">5</a>…<a href="">10</a><a href="">11</a><a href="">12</a>...<a href="">100</a><a href="">101</a><a href="">next >></a></p>--%>
                        <p>
                            <asp:Literal ID="ltrPaging" runat="server"></asp:Literal></p>
                        <p>
                            &nbsp;</p>
                    </div>
                </div>
                <!-- end of right content-->
            </div>
            <!--end of center content -->
            <div class="clear">
            </div>
        </div>
        <!--end of main content-->
        <div class="footer">
            <div class="left_footer">
                SBook 2012</div>
        </div>
    </div>
    </form>
</body>
</html>
